from python.extract_and_create import *

def main():
    # 初始化openai和neo4j客户端
    openAiClient = OpenAIClient(Constant.DEEPSEEK_API_KEY, Constant.DEEPSEEK_BASE_URL)
    neo4jClient = Neo4jClient(Constant.NEO4J_USER, Constant.NEO4J_PASSWORD)

    # 创建节点和关系
    extract_and_create = ExtractAndCreate(openAiClient, neo4jClient, "./resource/源文本文件.txt", True)
    strTuple = extract_and_create.extractFileTextToStrTuple()
    dataTuple = extract_and_create.strTupleToTuple(strTuple)
    extract_and_create.createNodeAndRelationToNeo4j(dataTuple)

if  __name__ == '__main__':
    main()